#include "cuda.h"

#define CU_BLOCK_SIZE 20

__global__ void cu_uva_dgemm(int block_size, double *L, int ldL, int a_start, double *A, int lda, int cur_gpu, 
							 int gpu_num, double** gpu_matrix_blocks)
{
	const int tx = threadIdx.x;
	const int ty = threadIdx.y;
	
	const int bx = blockIdx.x;
	const int by = blockIdx.y;
	
	int global_x = ((bx*BLOCK_SIZE + a_start)/block_size)*gpu_num*block_size + cur_gpu*block_size + tx;
	int global_y = ((by*BLOCK_SIZE + a_start)/block_size)*gpu_num*block_size + cur_gpu*block_size + ty;



	__shared__ double l21_block_x_shared[BLOCK_SIZE][BLOCK_SIZE];
	__shared__ double l21_block_y_shared[BLOCK_SIZE][BLOCK_SIZE];
	
}

void uva_dgemm(int block_size, double *L, int ldL, int a_start, double *A, int lda, int cur_gpu, int gpu_num, double** gpu_matrix_blocks )
{
	//int num_elements = (lda - a_start)*(lda - a_start);
	const dim3 threads(CU_BLOCK_SIZE, CU_BLOCK_SIZE);

	const dim3 blocks((lda - a_start)/threads.x, (lda - a_start)/threads.y);
}